<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<title>Administrativo</title>
<script>
function foca(){
	document.getElementById('nome').focus()
}
</script>
<?php
require_once '../class/usuarios.class.php';
if(@$_POST['Autenticar'] and $_POST['senha'] != '' and $_POST['nome'] != ''){
	UsuariosControl::logaUsuarios($_POST['nome'], $_POST['senha']);
}
if(@$_GET['logoff']){
	UsuariosControl::deslogaUsuarios();
}
?>
</head>
<body onload="foca();">
<div id="conteudo">
<div id="login">
<center>
	<img src="../imagens/logo.png" vspace="10" />
</center> 
<form action="login.php" method="post" id="form1" name="form1">
<table width="100%" border="0" align="center" class="tabela">
	<tr>
		<td width="30%">Login:</td>
		<td width="70%"><label> <input name="nome" type="text" class="input" id="nome" /> </label></td>
	</tr>
	<tr>
		<td>Senha:</td>
		<td><label> <input name="senha" type="password" class="input" id="senha" /> </label></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td align="right"><label><input name="Autenticar" type="submit" class="botoes" id="Autenticar" value="Entrar" /> </label></td>
	</tr>
</table>
</form>
</div>
</div>
</body>
</html>
